import request from '@/utils/request';

// 生成 任务计划明细
export const createTaskPlanApi = (params) => {
    return request({
        url: `/nxcloud-handler/v1/api/trigger/task/generate/plan/`,
        method: 'post',
        data: params,
        baseURL: process.env.VUE_APP_BASE_API_ZK
    })
}

// 任务计划创建
export const createPlanApi = (params) => {
    return request({
        url: `/nxcloud-handler/v1/api/trigger/task/plan/create`,
        method: 'post',
        data: params,
        baseURL: process.env.VUE_APP_BASE_API_ZK
    })
}

// 任务计划详情
export const getPlanDetailApi = (taskId) => {
    return request({
        url: `/nxcloud-handler/v1/api/trigger/task/plan/detail/${taskId}`,
        method: 'post',
        // data: params,
        baseURL: process.env.VUE_APP_BASE_API_ZK
    })
}

// 任务计划更新
export const updatePlanApi = (params) => {
    return request({
        url: `/nxcloud-handler/v1/api/trigger/task/plan/update`,
        method: 'post',
        data: params,
        baseURL: process.env.VUE_APP_BASE_API_ZK
    })
}